
[org 0x7c00]

start:
	
	mov bp, 0x8000
	mov sp, bp

	call .check_input_c2

.print:
	mov ah, 0x0E
	mov al, 0x0D
	int 0x10
	mov al, 0x0A
	int 0x10

	mov al, 'H'
	int 0x10

	mov al, 'a'
	int 0x10

	mov al, 'n'
	int 0x10

	mov al, 'O'
	int 0x10

	mov al, 'S'
	int 0x10


	mov al, '>'
	int 0x10

	mov al, '>'
	int 0x10




.wait_input:
	mov ah, 0x00
	int 0x16
	cmp al, 'c'
	je .check_input_c1
	cmp al, 'e'
	je .check_input_e
	cmp al, 'p'
	je .check_input_6.py
	cmp al, '.'
	je .check_input_py
	cmp al, 'l'
	je .check_input_l

	cmp al, 0x0D
	je .bad_input
	mov ah, 0x0E
	int 0x10
	jmp .wait_input

.check_input_l:
	mov ah, 0x0E
	int 0x10
	mov ah, 0x00
	int 0x16
	mov ah, 0x0E
	int 0x10
	cmp al, 's'
	jne .wait_input
	mov ah, 0x00
	int 0x16
	cmp al, 0x0D
	jne .wait_input
	mov ah, 0x0E
	mov al, 0x0D
	int 0x10
	mov al, 0x0A
	int 0x10
	mov al, 'p'
	int 0x10
	mov al, ' '
	int 0x10
	mov al, ' '
	int 0x10
	mov al, 'P'
	int 0x10
	mov al, 'Y'
	int 0x10
	mov al, ' '
	int 0x10
	mov al, ' '
	int 0x10
	mov al, '1'
	int 0x10
	mov al, '2'
	int 0x10
	mov al, 'B'
	int 0x10
	mov al, 0x0D
	int 0x10
	mov al, 0x0A
	int 0x10
	mov al, 'o'
	int 0x10
	mov al, 's'
	int 0x10
	mov al, ' '
	int 0x10
	mov al, 'S'
	int 0x10
	mov al, 'Y'
	int 0x10
	mov al, 'S'
	int 0x10
	mov al, ' '
	int 0x10
	mov al, '1'
	int 0x10
	mov al, '4'
	int 0x10
	mov al, '4'
	int 0x10
	mov al, '0'
	int 0x10
	mov al, 'K'
	int 0x10
	mov al, 'B'
	int 0x10

	jmp .print

.check_input_py:
	mov ah, 0x0E
	int 0x10
	mov ah, 0x00
	int 0x16
	mov ah, 0x0E
	int 0x10
	cmp al, '\'
	jne .wait_input
	mov ah, 0x00
	int 0x16
	mov ah, 0x0E
	int 0x10
	cmp al, 'p'
	jne .wait_input

	mov ah, 0x00
	int 0x16
	cmp al, 0x0D
	jne .wait_input
	mov ah, 0x0E
	mov al, 0x0D
	int 0x10
	mov al, 0x0A
	int 0x10
	mov al, '6'
	int 0x10
	mov al, '6'
	int 0x10
	mov al, '6'
	int 0x10

	jmp .print

.check_input_e:
	mov ah, 0x0E
	int 0x10
	mov ah, 0x00
	int 0x16
	cmp al, 0x0D
	jne .wait_input
	MOV AL,0x13
	MOV AH,0x00
	INT 0x10
	jmp .done

.check_input_c1:
	mov ah, 0x0E
	int 0x10
	mov ah, 0x00
	int 0x16
	cmp al, 0x0D
	jne .wait_input
.check_input_c2:
	mov ax, 0x0600
	mov bx, 0x0700
	mov cx, 0
	mov dx, 0x184f
	int 0x10
	mov ah, 02h
	xor bh, bh
	mov dh, 0
	mov dl, 0
	int 10h
	jmp .print
.bad_input:
	mov ah, 0x0E
	mov al, 0x0D
	int 0x10
	mov al, 0x0A
	int 0x10
	mov al, 'b'
	int 0x10
	mov al, 'a'
	int 0x10
	mov al, 'd'
	int 0x10

	jmp .print
.done:
	ret
	jmp .done

.check_input_6.py:
	mov ah, 0x0E
	int 0x10

	mov ah, 0x00
	int 0x16
	mov ah, 0x0E
	int 0x10
	cmp al, '.'
	jne .wait_input

	mov ah, 0x00
	int 0x16
	mov ah, 0x0E
	int 0x10
	cmp al, 'p'
	jne .wait_input

	
	mov ah, 0x00
	int 0x16
	mov ah, 0x0E
	int 0x10
	cmp al, 'y'
	jne .wait_input

	mov ah, 0x00
	int 0x16
	cmp al, 0x0D
	jne .wait_input
	mov ah, 0x0E
	mov al, 0x0D
	int 0x10
	mov al, 0x0A
	int 0x10

	mov al, 'p'
	int 0x10

	mov al, 'r'
	int 0x10

	mov al, 'i'
	int 0x10

	mov al, 'n'
	int 0x10

	mov al, 't'
	int 0x10

	mov al, '('
	int 0x10

	mov al, '"'
	int 0x10

	mov al, '6'
	int 0x10

	mov al, '6'
	int 0x10

	mov al, '6'
	int 0x10

	mov al, '"'
	int 0x10

	mov al, ')'
	int 0x10

	jmp .print





times 510-($-$$) db 0
dw 0xAA55
